#include "../include/unrealhandler.h"


using namespace Gtk;
using namespace Glib;
using namespace Gio;

UnrealHandler::UnrealHandler(ustring adres, unsigned port, unsigned controllerport)
{
    //ctor
    refSocketClient = Gio::SocketClient::create();

    //cout << "client: " << refSocketClient << endl;

    serverAdress = adres;
    this->port= port;
    this->controllerport= controllerport;
    botcounter=0;
	addControllerBot();
}

UnrealHandler::~UnrealHandler()
{
    //dtor
}


UnrealControllerBot* UnrealHandler::createControllerBot(){

    UnrealControllerBot* nb = new UnrealControllerBot(refSocketClient, serverAdress, controllerport);
    nb->name="Controller";
    return nb;
}

void UnrealHandler::addControllerBot(){
    addBot(*createControllerBot());
}

